package com.zzyl.nursing.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zzyl.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 预约对象 reservation
 * 
 * @author zzyl
 */
@ApiModel(description = "预约对象")
@TableName("reservation")
public class Reservation extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 预约ID */
    @ApiModelProperty(value = "预约ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /** 预约人姓名 */
    @ApiModelProperty(value = "预约人姓名")
    @NotBlank(message = "预约人姓名不能为空")
    private String name;

    /** 手机号 */
    @ApiModelProperty(value = "手机号")
    @NotBlank(message = "手机号不能为空")
    private String mobile;

    /** 预约时间 */
    @ApiModelProperty(value = "预约时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "预约时间不能为空")
    private Date time;

    /** 预约类型 0:参观预约 1:其他 */
    @ApiModelProperty(value = "预约类型 0:参观预约 1:其他")
    private Integer type;

    /** 家人姓名（老人姓名） */
    @ApiModelProperty(value = "家人姓名（老人姓名）")
    private String visitor;

    /** 状态 0:待上门 1:已完成 2:已取消 3:已过期 */
    @ApiModelProperty(value = "状态 0:待上门 1:已完成 2:已取消 3:已过期")
    private Integer status;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }

    public void setMobile(String mobile) 
    {
        this.mobile = mobile;
    }

    public String getMobile() 
    {
        return mobile;
    }

    public void setTime(Date time) 
    {
        this.time = time;
    }

    public Date getTime() 
    {
        return time;
    }

    public void setType(Integer type) 
    {
        this.type = type;
    }

    public Integer getType() 
    {
        return type;
    }

    public void setVisitor(String visitor) 
    {
        this.visitor = visitor;
    }

    public String getVisitor() 
    {
        return visitor;
    }

    public void setStatus(Integer status) 
    {
        this.status = status;
    }

    public Integer getStatus() 
    {
        return status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("mobile", getMobile())
            .append("time", getTime())
            .append("type", getType())
            .append("visitor", getVisitor())
            .append("status", getStatus())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
} 